package com.lyf.learn.atsgg.spring.ioc.bean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @AUTHOR LYF
 * @DATE 2022/5/25
 * @VERSION 1.0
 * @DESC
 */
public class BeanPostBean implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("执行POST之前:"+beanName);
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("执行POST之后:"+beanName);
        return bean;
    }
}
